// pages/user-my-rank/user-my-rank.js
var WxParse = require('../../wxParse/wxParse.js');
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    wallet:"",//等级数据
    imgUrl: app.globalData.imgUrl, //请求接口图片路径
    localImg: app.globalData.staticimgUrl,  // 本地图片
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    this.live();
    this.grade();    
  },

  live:function(){
    var that = this;
    app.request({
      url: 'doctor/wallet/getUserLevel',
      data: {
        userId: wx.getStorageSync('userid'),
      },
      success(res) {
        that.setData({
          wallet: res.data.userAccount,
        })
      }
    })
  },

  grade: function () {
    var that = this;
    app.request({
      url: 'system/officialapi/officialdetail',
      data: {
        id:4,
      },
      success(res) {
        var article = res.data.content;
         WxParse.wxParse('article', 'html', article, that, 5);
        that.setData({
          contentList: res.data.contentList,
        })
      }
    })
  },
  //会员规则
  terrace: function () {
    var id = 6;
    wx.navigateTo({
      url: '../doctor-news-system/doctor-news-system?id=' + id,
    })

  }
})